home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / MCIWND.PAK / MCIWND.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  1KB  |  71 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1995, 1995 by Borland International, All Rights Reserved
  4. //
  5. // Implementation of class TMciWnd
  6. //----------------------------------------------------------------------------
  7. #include <owl/pch.h>
  8. #include "mciwnd.h"
  9.  
  10. #if defined(BI_PLAT_WIN32)
  11.   char MciWndDllName[] = "MSVFW32.DLL";
  12. #else
  13.   char MciWndDllName[] = "MSVIDEO.DLL";
  14. #endif
  15.  
  16. //
  17. //
  18. //
  19. TMciWndDll::TMciWndDll()
  20. :
  21.   TModule(MciWndDllName),
  22.  
  23.   Create(*this, "MCIWndCreate"),               // or use ord:42
  24.   RegisterClass(*this, "MCIWndRegisterClass")  // or use ord:45
  25. {
  26. }
  27.  
  28. //
  29. //
  30. //
  31. TMciWnd::TMciWnd(TWindow* parent, int id, char far* title, 
  32.                  int x, int y, int w, int h, TModule* module)
  33. :
  34.   TControl(parent, id, title, x, y, w, h, module)
  35. {
  36.   Attr.Style |= MCIWNDF_NOTIFYALL;
  37. }
  38.  
  39. //
  40. //
  41. //
  42. TMciWnd::TMciWnd(TWindow* parent, int resourceId, TModule* module)
  43. :
  44.   TControl(parent, resourceId, module)
  45. {
  46. }
  47.  
  48. //
  49. //
  50. //
  51. char far*   
  52. TMciWnd::GetClassName() 
  53. {
  54.   return MCIWND_WINDOW_CLASS;
  55. }
  56.  
  57. //
  58. //
  59. //
  60. bool        
  61. TMciWnd::Register()
  62. {
  63.   PRECONDITION(GetModule());
  64.  
  65.   WNDCLASS  windowClass;
  66.   if (!GetModule()->GetClassInfo(GetClassName(), &windowClass)) {
  67.     return MciWndDll.RegisterClass() != 0;
  68.   }
  69.   return true;
  70. }
  71.